package com.ma.server.Impl;

import com.ma.Dao.TeacherDao;
import com.ma.entity.Teacher;
import com.ma.entity.TeacherVO;
import com.ma.server.TeacherServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @ProjectName: project
 * @Package: com.ma.server.Impl
 * @ClassName: TeacherServerImpl
 * @Author: YHHHH
 * @Description:
 * @Date: 2021/3/29 16:37
 * @Version: 1.0
 */
@Service
@Transactional
public class TeacherServerImpl implements TeacherServer {

    @Autowired
    private TeacherDao teacherDao;

    @Override
    public TeacherVO loginTeacher(Integer id) {
        TeacherVO teacherVO = teacherDao.loginTeacher(id);

        return teacherVO;
    }

    @Override
    public Teacher teacherData(Integer id) {
        Teacher teacher = teacherDao.teacherData(id);

        return teacher;
    }

    @Override
    public Integer findTeacherMajor(Integer id) {

        Integer teacherMajor = teacherDao.findTeacherMajor(id);
        return teacherMajor;

    }
}
